<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    .box {
      transform-style: preserve-3d;
      width: 400px;
      height: 200px;
      margin: 200px auto;
      position: relative;
      transition: all 15s linear;
    }

    .item {
      position: absolute;
      top: 0;
      left: 0;
      width: 400px;
      height: 200px;
      background: rgba(0,0,0,0.3);
      color: #fff;
      /* backface-visibility: hidden; */
    }
    body {
      transform-style: preserve-3d;
      perspective: 800px;

    }
    .box:hover {
      transform: rotateY(360deg);
    }
  </style>
</head>
<body>
  <div class="box">
    <div class="item">1</div>
    <div class="item">2</div>
    <div class="item">3</div>
    <div class="item">4</div>
    <div class="item">5</div>
    <div class="item">6</div>
    <div class="item">7</div>
    <div class="item">8</div>
    <div class="item">9</div>
    <div class="item">10</div>
    <div class="item">11</div>
    <div class="item">12</div>

  </div>

  <script>
    var item = document.querySelectorAll('.item')
    var z = Math.sqrt(Math.pow(400, 2) - Math.pow(200, 2)) + 20
    for (var i = 0; i<item.length; i++) {
      item[i].style.transform = "rotateY(-" + i * 30 + "deg) translateZ(-800px)";
    }
  
  </script>
</body>
</html>